package com.autorun.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.autorun.server.entity.UserConfig;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 用户配置关联Mapper接口
 * 
 * @author autorun
 * @version 1.0.0
 */
@Mapper
public interface UserConfigMapper extends BaseMapper<UserConfig> {

    /**
     * 删除配置的所有用户关联
     * 
     * @param configId 配置ID
     * @return 删除数量
     */
    @Delete("DELETE FROM user_configs WHERE config_id = #{configId}")
    Integer deleteByConfigId(@Param("configId") Integer configId);
}